<?php
$this->load->view("header");
?>

<div>
    <form name="select_order" id="select_order"  method="post" action="<?=site_url()?>/order/order_info">
<?PHP
    $n = 0;
    if( $book != null ){
        echo "
            <br/>
            请注意我们暂时<b>只在浙大紫金港校区开展活动。</b>您已选购以下书籍：
            <br/>
            <br/>
            <table>
            <tr>
                <th width=\"200px\">书名</th>
                <th width=\"100px\">原价</th>
                <th width=\"100px\">书易价</th>
                <th width=\"100px\">保有量</th>
                <th width=\"100px\">数量</th>
                <th width=\"100px\">删除</th>
            </tr>";
        foreach( $book as $book_info ) {
            $n++;
            echo "<tr>";
            echo "<td width=\"200px\" align=\"center\">" . $book_info->title .
                 "<input type=\"hidden\" name=\"title_" .$n. "\" value=\"" .$book_info->title . "\"/> </td>";
            echo "<td width=\"100px\" align=\"center\">" . $book_info->org_price . "</td>";
            echo "<td width=\"100px\" align=\"center\">" . $book_info->sale_price .
                 "<input type=\"hidden\" name=\"price_" .$n. "\" value=\"" .$book_info->sale_price . "\"/> </td>";
            echo "<td width=\"100px\" align=\"center\">" . $book_info->number . "</td>";
            echo "<td width=\"100px\" align=\"center\">
                  <input type=\"hidden\" name=\"book_id_" .$n. "\" value=\"" .$book_info->book_id ."\" />";
            echo "<input type=\"text\" size=\"1px\" value=\"1\" name=\"order_number_" .$n. "\"/></td>";
            echo "<td width=\"100px\" align=\"center\">删除</td>";
            echo "</tr>";
        }
        echo "
            </table>";
        echo "
            <p><font color=\"red\">" .$warning. "</font></p>
            <input type=\"submit\" value=\"确定\">
            <input type=\"hidden\" name=\"isbn13\" value=\"" .$isbn13. "\"/>
            <input type=\"hidden\" name=\"num_kinds\" value=\"" .$n. "/> <!-- 表示有多少种成色的书籍 -->
            <input type=\"hidden\" name=\"go\" value=\"yes\"/>";
    }
    else
        echo "<p><font color=\"red\">此书书易暂时无货，您可以暂存在购物车，有货时书易会邮件提醒您。</font></p>";
?>
           
    </form>
    <div>
        <p><a href="<?=site_url()?>/user/shop_car">购物车</a></p>
    </div>

</div>


<?php
$this->load->view("footer");
?>